package cn.org.alexander.entity.response;

import java.io.Serializable;

/**
 * @author Alexander
 * @date 2022/5/21
 * @desc 数据响应
 */
public class DataResponseResult<T> extends ResponseResult implements Serializable {

    private static final long serialVersionUID = 3792165428965547653L;

    private T data;

    public DataResponseResult(ResultCode resultCode, T data) {
        super(resultCode);
        this.data=data;
    }

    public static  DataResponseResult newSuccessInstance(Object data){
         return  new DataResponseResult(CommonCode.SUCCESS,data);
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
